{% extends 'my/learning/course/layout.html.twig' %}

{% set mobile = is_show_mobile_page() %}
{% set tab_nav = 'learning' %}
{% block title %}{{ 'my.learning.course.learning'|trans }} - {{ parent() }}{% endblock %}

{% block main %}

  <div class="panel panel-default panel-col">

    <div class="panel-heading">
      {{ 'my.learning.course'|trans }}
      <a class="btn cd-btn cd-btn-info cd-btn-sm pull-right" href="{{ path('my_courses_live_calendar') }}">{{ 'my.learning.live_schedule_menu'|trans }}</a>
    </div>

    <div class="panel-body">
      {% include 'my/learning/course/nav-pill.html.twig' %}
      {% set type = 'learning' %}

      {% for courseSet in courseSets if courseSet %}
        {% set currentCourses = courses[courseSet.id] %}
        {% set classroom = courseSet['classroom']|default(null) %}

        {% if currentCourses %}
          {% include 'my/learning/course/courses-block-item.html.twig' %}
        {% endif %}
      {% else %}
        <div class="cd-empty">{{ 'my.learning.course.learning_empty'|trans }}</div>
      {% endfor %}
      {{ web_macro.paginator(paginator) }}
    </div>
  </div>
{% endblock %}

{% block main_mobile %}
  {% if mobile %}
    {% include 'my/learning/course/learning-mobile.html.twig' with {'courses':learningCourses} %}
  {% endif %}
{% endblock %}

{% block bottom %}
  {% include 'mobile/footer-tool-bar.html.twig' with { mobile_tool_bar: 'learning' } %}
{% endblock %}

